

SOFTWARE_VER		   = v001


BUILD_TIME:=$(shell date +%m%d%H%M)

PLATFORM="rv1126"

ifeq ($(PLATFORM), "rv1126")
        TOOLCHAIN_DIR = /opt/atk-dlrv1126-toolchain
        CC = $(TOOLCHAIN_DIR)/bin/arm-linux-gnueabihf-gcc
        RM = rm
        MV = mv
        AR = $(TOOLCHAIN_DIR)/bin/arm-linux-gnueabihf-ar
        OBJDUMP = $(TOOLCHAIN_DIR)/bin/arm-linux-gnueabihf-objdump

        INC = $(TOOLCHAIN_DIR)/include
        LIB_DIRS = $(TOOLCHAIN_DIR)/lib

        INC += 3rd/include
        INC += 3rd/include/mosquitto
        INC += 3rd/include/modbus
        LIB_DIRS += 3rd/lib
        LIB_DIRS += 3rd/lib/mosquitto
        LIB_DIRS += 3rd/lib/libmodbus

        SRC_DIRS  = 3rd/utils

else ifeq ($(PLATFORM), "pc")
	INC += ../common-pc/include
	INC += ../common-pc/include/mosquitto
	INC += ../common-pc/include/libmodbus
	LIB_DIRS += ../common-pc/lib
	LIB_DIRS += ../common-pc/lib/mosquitto
	LIB_DIRS += ../common-pc/lib/libmodbus

	SRC_DIRS  = ../common-pc/utils

else 
	echo errro!!!!!!
endif



TARGET_DIR=./zout/target
OUTPUTIDR=./zout/objs
CFLAGS = -O0  -DSOFTWARE_VER=\"$(SOFTWARE_VER)\"  -DBUILD_TIME=\"$(BUILD_TIME)\"

TARGET_NAME=$(TARGET_DIR)/sys_manager_$(SOFTWARE_VER)_$(BUILD_TIME)



INC += ./include
LIB_DIRS += ./lib

SRC_DIRS  += ./main
SRC_DIRS  += ./msg
SRC_DIRS  += ./mqtt
SRC_DIRS  += ./sys
SRC_DIRS  += ./utils
